<?php
    namespace app\api\controller;
    use think\Controller as Controller;

    class Index extends Controller
    {
        public function getBanner(){
            $data = [
                'is_show' => 1
            ];
            $order = [
              'listorder' => 'desc'
            ];
            $bannerList = db('banner')->where($data)->order($order)->select();
            if(!$bannerList){
                return show(0,'error');
            }
            return show(1,'success',$bannerList);
        }
        public function album(){
            $url = 'https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg?singermid=000CK5xN3yZDJt&g_tk=5381&uin=0&format=json&inCharset=utf-8&outCharset=utf-8&notice=0&platform=h5page&needNewCode=1&order=listen&from=h5&num=15&begin=0&_=1527662635628';
            $res = doCurl($url);
            if($res){
                return json_decode($res,true);
            } else{
                return [];
            }
        }
    }